﻿using System;
using System.Collections.Generic;

namespace WebStickyNotes.Contracts.Interfaces
{
    public interface IWebStickyNotesDataAccess : IDisposable
    {
        TaskProject GetTaskProject(int id);
        int SaveTaskProject(TaskProject taskProject);
        void DeleteTaskProject(int id);
        List<TaskProject> GetAllTaskProjects();
        List<TaskDetail> GetTasksByProject(int taskProjectId);

        TaskStream GetTaskStream(int id);
        int SaveTaskStream(TaskStream taskStream);
        void DeleteTaskStream(int id);
        List<TaskStream> GetAllTaskStreams();
        List<TaskStream> GetStreamsByProject(int taskProjectId);
        List<TaskDetail> GetTasksByStream(int taskStreamId);

        ExtendedTaskDetail GetTaskDetail(int id);
        int SaveTaskDetail(TaskDetail taskDetail);
        void DeleteTaskDetail(int id);
        List<TaskDetail> GetAllTaskDetails();
        List<TaskDetail> GetTasksForSearch(string searchTerm);

        TaskPerson GetTaskPerson(int id);
        int SaveTaskPerson(TaskPerson taskPerson, IEnumerable<int> allowedProjects);
        void DeleteTaskPerson(int id);
        TaskPerson GetTaskPersonByEmail(string email);
        List<TaskPerson> GetAllTaskPeople();
        List<TaskDetail> GetTasksByPerson(int taskPersonId);

        TaskRole GetTaskRole(int id);
        int SaveTaskRole(TaskRole taskRole);
        void DeleteTaskRole(int id);
        List<TaskRole> GetAllTaskRoles();
        List<TaskPerson> GetPeopleByRole(int taskRoleId);

        TaskPriority GetTaskPriority(int id);
        int SaveTaskPriority(TaskPriority taskPriority);
        void DeleteTaskPriority(int id);
        List<TaskPriority> GetAllTaskPriorities();
        List<TaskDetail> GetTasksByPriority(int taskPriorityId);

        List<TaskAudit> GetAllTaskAudits();
        TaskAudit GetTaskAudit(int id);
        int SaveTaskAudit(TaskAudit taskAudit);
        void DeleteTaskAudits(DateTime date);
        List<TaskAudit> GetAllTaskAuditsForSearch(int searchId);
        List<TaskProject> GetTaskProjectsForPerson(int taskPersonId);

        int SaveTaskProgress(TaskProgress taskProgress);
    }
}